Skip to content

docs(alb): correct and expand ALB authentication and identity docs - #174

Open
dlotterman wants to merge 3 commits into
mainfrom
docs/alb-auth-identity
Open

dlotterman wants to merge 3 commits into
mainfrom
docs/alb-auth-identity

Conversation

@dlotterman

Copy link
Copy Markdown
Contributor

Corrects the ALB authentication pages and documents what the ALB's SecurityPolicy already supports beyond Basic Auth, Google, and Auth0. Examples were validated with server-side dry-runs, and most were tested live on throwaway load balancers.

Corrections

  • Google OIDC isn't limited to "anyone with a Google account". Add a jwt block that reads the ID-token cookie (cookieNames.idToken + extractFrom.cookies) and an authorization rule on the hd claim to allow only your Workspace domain, or on email for named people. Others can still sign in with Google but get 403 at the edge. See "Restrict who can sign in" in oidc-google.mdx.
  • Auth0 page: removed the warning that jwt + oidc in one policy causes a 500 (it works, including with Google as the issuer), and the advice to remove the WAF when OIDC fails.
  • datumctl alb auth set attaches to the Gateway. A route-level policy (even CORS-only) replaces it for that route, and alb describe still reports Basic Auth as enabled.
  • alb describe doesn't show hand-written policies or added routes.
  • A route takes one SecurityPolicy; a second is rejected as Conflicted.
  • Basic Auth forwards the Authorization header, password included, to the origin. Per-user passwords and forwardUsernameHeader are now documented.

New pages

API keys, JWT, OIDC with any provider, authorization rules, CORS, and per-path authentication. The overview now lists what isn't available: client certificates (mTLS), extAuth, retries to the identity provider, location rules, and auth metrics.

OIDC logoutPath, passThroughAuthHeader (a valid bearer token skips sign-in), and denyRedirect (401 instead of a redirect for JSON requests) were tested live. refreshToken is described from Envoy Gateway's reference.

Needs a check before merge

  • Restricting real Google sign-ins end to end. The policy loads with Google as the issuer, and the claim rules were tested with Keycloak standing in for Google, but no real Google account has signed in through it.
  • Auth0-specific guidance. It wasn't tested against an Auth0 tenant.
  • oidc.mdx tells readers to host their identity provider outside Datum, because an issuer behind a Datum ALB failed about half of token exchanges in testing. Engineering may want to confirm before this is public.

Platform bugs found (documented as known issues)

  • alb auth unset / alb delete leave the ALB_NAME-basic-auth Secret behind without its gateway-sync label but with the gateway-resource-replicator finalizer, so deleting it hangs in Terminating.
  • alb delete leaves hand-added HTTPRoutes orphaned.

Should merge cleanly with #173, which touches docs.json and the ALB overview pages.

@dlotterman
dlotterman requested a review from a team as a code owner November 18, 2026 20:47
@mintlify

mintlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Datum 🟢 Ready View Preview Nov 30, 2026, 4:26 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@scotwells scotwells left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several statements would send a reader to the wrong fix, and one leaves a path unprotected without saying so.

  • Secret label and 500: the operator now adds networking.datumapis.com/gateway-sync to any Secret a SecurityPolicy references, so a missing label no longer causes a 500, and datumctl alb auth set doesn't add it either. A policy naming a Secret that doesn't exist is held from the edge with Accepted=False / PendingSecret, and a new route policy in that state leaves requests unauthenticated. Replace the "label or 500" warnings and troubleshooting rows (overview, basic-auth, api-keys, oidc, oidc-google, oidc-auth0) with "check the SecurityPolicy for PendingSecret", and say requests aren't protected until it clears.
  • Per-path routes skip the HTTPS redirect: the added /api route wins over the load balancer's force-HTTPS rule (longest prefix beats a header match), so http://HOST/api is served in cleartext, keys included. Add an x-forwarded-proto: http redirect rule to the new route in Step 2, or call out the gap.
  • OIDC defaults: refreshToken defaults to true. /logout is active even when logoutPath isn't set, and for providers that publish end_session_endpoint (Keycloak, Okta, Entra, Auth0) it also signs the person out of the provider. Only Google matches the current wording.
  • CORS: * in allowOrigins matches any characters, dots included, so https://*.example.com also allows deeper subdomains.
  • Google troubleshooting: "openid scope missing" can't cause a 401, because openid is always added (as oidc.mdx says). Drop that row.

dlotterman and others added 3 commits November 30, 2026 08:26
Fix wrong or incomplete auth information, verified live against the
ALB on 2026-11-18:
- Google OIDC can be limited to a Workspace domain or listed people
  with a jwt block on the ID token cookie plus authorization rules;
  it is not "anyone with a Google account" only.
- oidc + jwt in one policy works; drop the Auth0 warning that it
  causes a 500, and the advice to remove the WAF.
- datumctl alb auth set attaches to the Gateway; a route-level policy
  silently replaces it while alb describe still reports it enabled.
- alb describe doesn't show hand-written policies or added routes.
- One SecurityPolicy per route; a second is rejected as Conflicted.
- Basic Auth forwards the Authorization header (with password) to the
  origin; forwardUsernameHeader and per-user passwords are supported.

Add pages for API keys, JWT, generic OIDC (any provider), authorization
rules, CORS, and per-path authentication, and list what isn't
available (mTLS, extAuth, provider retries, GeoIP, auth metrics).
Secrets no longer need the gateway-sync label; document PendingSecret
instead of 500. Add HTTPS redirect to the per-path route, correct OIDC
refreshToken/logout defaults and the CORS wildcard description, and drop
the incorrect Google openid troubleshooting row.
@dlotterman

Copy link
Copy Markdown
Contributor Author

@scotwells ty, I think comments addressed.

This branch was successfully deployed

1 active deployment
staging — ad9f538f Deployed Nov 30, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants